﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Press.MVC.Data
{
    public class Activation
    {
        public int ID { get; set; }
        public string ActivationCode { get; set; }        
        public int BlogId { get; set; }
        public string IpAddress { get; set; }
        public DateTime CreatedDate { get; set; }
        public DateTime ActivatedDate { get; set; }

        #region object overrides
        public override bool Equals(object obj)
        {
            if (obj is Activation)
            {
                Activation compareTo = (Activation)obj;
                return compareTo.ID == this.ID;
            }
            else
            {
                return base.Equals(obj);
            }
        }

        public override string ToString()
        {
            return this.ActivationCode;
        }
        public override int GetHashCode()
        {
            return this.ID.GetHashCode();
        }
        #endregion
    }
}
